package com.zxq.frame;

import com.zxq.factory.annotate.DecoderField;
import com.zxq.factory.annotate.EncoderField;
import com.zxq.factory.annotate.Frame;
import com.zxq.factory.enums.EField;
import com.zxq.factory.enums.ETrimMethod;
import com.zxq.frame.modbus.inner.MBAP;
import com.zxq.frame.modbus.inner.PDU;
import lombok.Data;

@Frame(id = 2L,remark = "传感器协议")
@Data
public class TcpModBusFrame {

    @EncoderField(field = EField.Frame,sequence = 1,note = "tcp报文头")
    @DecoderField(field = EField.Frame,sequence = 1,param = 7,note = "tcp报文头")
    MBAP mbap = new MBAP();

    @EncoderField(field = EField.Frame,sequence = 2,note = "pdu数据")
    @DecoderField(field = EField.Frame,sequence = 2,method = ETrimMethod.Tail,param = 0,note = "pdu数据")
    PDU pdu = new PDU();


}
